package store.lunangangster.nodeflow.test.flow._for.component;

import java.util.Random;
import org.springframework.stereotype.Component;
import store.lunangangster.nodeflow.core.component.ExitComponent;

@Component("springF")
public class SpringCompFExit extends ExitComponent {

  @Override
  public boolean processExit() {
    boolean exit = new Random().nextBoolean();
    String exitString = exit ? "exit" : "don't exit";
    System.out.println("I'm F, a ExitComponent. I " + exitString);
    return exit;
  }
}
